package com.example.mplayer.viewmodels

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import com.example.mplayer.data.AppDatabase
import com.example.mplayer.data.CourseWithChapters
import kotlinx.coroutines.flow.Flow

class CourseViewModel(application: Application) : AndroidViewModel(application) {
    private val courseDao = AppDatabase.getDatabase(application).courseDao()
    
    val allCourses: Flow<List<CourseWithChapters>> = courseDao.getAllCourses()
} 